// 路由管理

/* 
使用明细：
   utils: 放置页面路由（对象）
   url：路由配置
   path：路由路径配置
   name：路由名称配置
   component：路由组件
   meta：路由传参, （参数可通过this.$route.meta获取）
   title：路由相关数据，用于页面中路由渲染  name 路由名称 child 传参
*/


function getRouterFun () {
    return {
        utils: {
            company: { // 公司管理中心路由
                url: [ // 路由配置
                    {
                        path: '/',
                        redirect: '/material' // 重定向
                    },{
                        path: '/material',
                        name: 'material',
                        component: Material,
                        children: [
                            {
                                path: '/',
                                redirect: 'legal' // 重定向
                            },
                            {
                                path: 'legal',
                                name: 'legal',
                                component: Legal
                            },{
                                path: 'info',
                                name: 'info',
                                component: Info
                            },{
                                path: 'identity',
                                name: 'identity',
                                component: Identity
                            },{
                                path: 'product',
                                name: 'product',
                                component: Product
                            },{
                                path: 'style',
                                name: 'style',
                                component: Style
                            },{
                                path: 'info',
                                name: 'info',
                                component: Info
                            },{
                                path: 'type',
                                name: 'type',
                                component: Type
                            },{
                                path: 'num',
                                name: 'num',
                                component: Num
                            },{
                                path: 'equip',
                                name: 'equip',
                                component: Equip
                            },{
                                path: 'capacity',
                                name: 'capacity',
                                component: Capacity
                            },{
                                path: 'ambient',
                                name: 'ambient',
                                component: Ambient
                            }
                        ],
                    },
                    {
                        path: '/order',
                        name: 'order',
                        component: Order,
                        children: [
                            {
                                path: '/',
                                redirect: 'OPublish'
                            },{
                                path: 'OPublish',
                                name: 'OPublish',
                                component: OPublish
                            },{
                                path: 'OGrab',
                                name: 'OGrab',
                                component: OGrab,
                                children: [
                                    {
                                        path: '/',
                                        redirect: 'OGIndex'
                                    }, {
                                        path: 'OGIndex',
                                        name: 'OGIndex',
                                        component: OGIndex
                                    },{
                                        path: 'OGDetail',
                                        name: 'OGDetail',
                                        component: OGDetail
                                    }
                                ]
                            },{
                                path: 'OProduct',
                                name: 'OProduct',
                                component: OProduct,
                                children: [
                                    {
                                        path: '/',
                                        redirect: 'OPIndex'
                                    },{
                                        path: 'OPIndex',
                                        name: 'OPIndex',
                                        component: OPIndex
                                    },{
                                        path: 'OPDetail',
                                        name: 'OPDetail',
                                        component: OPDetail
                                    }
                                ]
                            },{
                                path: 'OFinish',
                                name: 'OFinish',
                                component: OFinish,
                                children: [
                                    {
                                        path: '/',
                                        redirect: 'OFIndex'
                                    },{
                                        path: 'OFIndex',
                                        name: 'OFIndex',
                                        component: OFIndex
                                    },{
                                        path: 'OFDetail',
                                        name: 'OFDetail',
                                        component: OFDetail
                                    },{
                                        path: 'OFEvaluate',
                                        name: 'OFEvaluate',
                                        component: OFEvaluate
                                    }
                                ]
                            }
                        ]
                    },{
                        path: '/inform',
                        name: 'inform',
                        component: Inform,
                        children: [
                            {
                                path: '/',
                                redirect: 'IIndex'
                            },{
                                path: 'IIndex',
                                name: 'IIndex',
                                component: IIndex
                            },{
                                path: 'IPublish',
                                name: 'IPublish',
                                component: IPublish
                            }
                        ]
                    },{
                        path: '/news',
                        name: 'news',
                        component: News,
                        children: [
                            {
                                path: '/',
                                redirect: 'NFactory'
                            },{
                                path: 'NFactory',
                                name: 'NFactory',
                                component: NFactory,
                                children: [
                                    {
                                        path: '/',
                                        redirect: 'NFIndex'
                                    },{
                                        path: 'NFIndex',
                                        name: 'NFIndex',
                                        component: NFIndex
                                    },{
                                        path: 'NFDetail',
                                        name: 'NFDetail',
                                        component: NFDetail
                                    },{
                                        path: 'NFMsg',
                                        name: 'NFMsg',
                                        component: NFMsg
                                    }
                                ]
                            },{
                                path: 'NRecruit',
                                name: 'NRecruit',
                                component: NRecruit,
                                children: [
                                    {
                                        path: '/',
                                        redirect: 'NRIndex'
                                    },{
                                        path: 'NRIndex',
                                        name: 'NRIndex',
                                        component: NRIndex
                                    },{
                                        path: 'NRDetail',
                                        name: 'NRDetail',
                                        component: NRDetail
                                    },{
                                        path: 'NRMsg',
                                        name: 'NRMsg',
                                        component: NRMsg
                                    }
                                ]
                            },{
                                path: 'NInside',
                                name: 'NInside',
                                component: NInside,
                                children: [
                                    {
                                        path: '/',
                                        redirect: 'NIIndex'
                                    },{
                                        path: 'NIIndex',
                                        name: 'NIIndex',
                                        component: NIIndex
                                    },{
                                        path: 'NIDetail',
                                        name: 'NIDetail',
                                        component: NIDetail
                                    },{
                                        path: 'NIMsg',
                                        name: 'NIMsg',
                                        component: NIMsg
                                    }
                                ]
                            },{
                                path: 'NSystem',
                                name: 'NSystem',
                                component: NSystem,
                                children: [
                                    {
                                        path: '/',
                                        redirect: 'NSYIndex'
                                    },{
                                        path: 'NSYIndex',
                                        name: 'NSYIndex',
                                        component: NSYIndex
                                    },{
                                        path: 'NSYDetail',
                                        name: 'NSYDetail',
                                        component: NSYDetail
                                    },{
                                        path: 'NSYMsg',
                                        name: 'NSYMsg',
                                        component: NSYMsg
                                    }
                                ]
                            },{
                                path: 'NSoon',
                                name: 'NSoon',
                                component: NSoon,
                                children: [
                                    {
                                        path: '/',
                                        redirect: 'NSIndex'
                                    },{
                                        path: 'NSIndex',
                                        name: 'NSIndex',
                                        component: NSIndex
                                    },{
                                        path: 'NSDetail',
                                        name: 'NSDetail',
                                        component: NSDetail
                                    },{
                                        path: 'NSMsg',
                                        name: 'NSMsg',
                                        component: NSMsg
                                    }
                                ]
                            }
                        ]
                    },{
                        path: '/recruit',
                        name: 'recruit',
                        component: Recruit,
                        children: [
                            {
                                path: '/',
                                redirect: 'RIndex',
                            },{
                                path: 'RIndex',
                                name: 'RIndex',
                                component: RIndex
                            },{
                                path: 'RDetail',
                                name: 'RDetail',
                                component: RDetail
                            },{
                                path: 'RPublish',
                                name: 'RPublish',
                                component: RPublish
                            }
                        ]
                    },{
                        path: '/collect',
                        name: 'collect',
                        component: Collect,
                        children: [
                            {
                                path: '/',
                                redirect: 'CIndex'
                            },{
                                path: 'CIndex',
                                name: 'CIndex',
                                component: CIndex
                            }
                        ]
                    },{
                        path: '/business',
                        name: 'business',
                        component: Business,
                        children: [
                            {
                                path: '/',
                                redirect: 'BIndex'
                            },{
                                path: 'BIndex',
                                name: 'BIndex',
                                component: BIndex
                            }
                        ]
                    },{
                        path: '/account',
                        name: 'account',
                        component: Account
                    },{
                        path: '*',
                        redirect: '/'
                    }
                ],
                title: [ // 路由名称, 用于页面渲染路由
                    {
                        name: 'material',
                        text: '资料设置',
                        child: {
                            id: 0,
                            url: [
                                {
                                    name: 'legal',
                                    text: '法人信息'
                                },{
                                    name:'info',
                                    text: '公司信息'
                                },{
                                    name:'identity',
                                    text: '公司认证'
                                },{
                                    name:'product',
                                    text: '公司产品'
                                },{
                                    name:'style',
                                    text: '产品风格'
                                },{
                                    name:'type',
                                    text: '产品种类'
                                },{
                                    name:'num',
                                    text: '款式数量'
                                },{
                                    name:'capacity',
                                    text: '产量产能'
                                },{
                                    name:'ambient',
                                    text: '公司环境'
                                }
                            ]
                        }
                    }, {
                        name: 'order',
                        text: '订单流程',
                        child: {
                            id: 1,
                            url: {}
                        }
                    }, 
                    // {
                    //     name: 'inform',
                    //     text: '资讯发布',
                    //     child: {}
                    // },
                    // {
                    //     name: 'news',
                    //     text: '我的消息',
                    //     child: {}
                    // },
                    // {
                    //     name: 'recruit',
                    //     text: '我的招聘',
                    //     child: {}
                    // },{
                    //     name: 'collect',
                    //     text: '我的收藏',
                    //     child: {}
                    // },{
                    //     name: 'business',
                    //     text: '商务合作',
                    //     child: {}
                    // },{
                    //     name: 'account',
                    //     text: '财务账户',
                    //     child: {}
                    // }
                ]
            }
        }
    }
}